﻿using SetSailControl.Controls;
using SetSailModel;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace SetSailView
{
    /// <summary>
    /// 加速器记录
    /// </summary>
    public partial class Frm_JSQJL : UserControl
    {
        public Frm_JSQJL()
        {
            InitializeComponent();
        }

        private void Frm_JSQJL_Load(object sender, EventArgs e)
        {
            DataGridViewColumnEntity[] lstLeftCulumns = new DataGridViewColumnEntity[1];
            lstLeftCulumns[0] = new DataGridViewColumnEntity() { DataField = "Value", HeadText = "列表一", TextAlign = ContentAlignment.MiddleLeft };

            DataGridViewColumnEntity[] lstRightCulumns = new DataGridViewColumnEntity[1];
            lstRightCulumns[0] = new DataGridViewColumnEntity() { DataField = "Value", HeadText = "列表二", TextAlign = ContentAlignment.MiddleLeft };

            this.ucTransfer1.LeftColumns = lstLeftCulumns;
            this.ucTransfer1.RightColumns = lstRightCulumns;

            var lstItems = new ItemModel[5];
            for (int i = 0; i < 5; i++)
            {
                lstItems[i] = new ItemModel() { Key = i, Value = "选择项" + i };
            }

            this.ucTransfer1.LeftDataSource = lstItems;
            this.ucTransfer1.RightDataSource = new ItemModel[0];
        }
    }
}
